package com.asfo.demo.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;
import java.io.PrintWriter;

@RestController
@Slf4j
public class DemoController {
    @RequestMapping("/hi")
    public void hi(HttpServletResponse response) throws Exception{
        System.out.println("demo is workd");
        log.debug("logger debug ");
        log.info("logger info ");
        PrintWriter writer = response.getWriter();
        writer.write("hello flow demo");
        writer.close();

    }
}
